using System;
using System.Collections.Generic;
using System.Text;

namespace Algorithms.Numerical.Impl
{
    public class TransposedViewDecorator : Matrix
    {
        private Matrix source;

        public TransposedViewDecorator(Matrix source)
        {
            this.source = source;        
        }

        public override int Height
        {
            get
            {
                return this.source.Width;
            }
        }

        public override int Width
        {
            get
            {
                return this.source.Height;
            }
        }

        public override double this[int y, int x]
        {
            get
            {
                return this.source[x, y];
            }
            set
            {
                this.source[x, y] = value;
            }
        }

    }
}
